"use strict";

/** @type {import('sequelize-cli').Migration} */
const fs = require("fs");
const p = require("path");
module.exports = {
  async up(queryInterface, Sequelize) {
    let jsonpath = p.join(__dirname, "teleplay_data.json");
    let dat = fs.readFileSync(jsonpath);
    await queryInterface.bulkInsert("teleplay_data", JSON.parse(dat).slice(2000), {});
  },

  async down(queryInterface, Sequelize) {
    return queryInterface.bulkDelete("teleplay_data", null, {});
  },
};
